package org.stone.project.dao;

import org.springframework.data.r2dbc.repository.Query;
import org.springframework.data.r2dbc.repository.R2dbcRepository;
import org.springframework.stereotype.Repository;
import org.stone.project.domain.UserInfo;
import reactor.core.publisher.Mono;

@Repository
public interface UserInfoDao extends R2dbcRepository<UserInfo,String> {
    @Query("select count(1) from user_info where password = :pwd ")
    Mono<Integer> countCustom(String pwd);


    @Query("select count(1) from user_info where username = :username or password = :pwd ")
    Mono<Integer> countCustomOrCre(String username,String pwd);
}
